@extends('layouts.app')

@section('content')
    <section class="content-header">
        <h1 class="pull-left">图文列表</h1>
    </section>
    <div class="content">
        <div class="clearfix"></div>

        @include('flash::message')

        <div class="clearfix"></div>
        <div class="box box-primary">
            <div class="box-body"><table class="table table-responsive" id="categories-table">
                    <thead>
                    <th>media_id</th>
                    <th>title</th>
                    <th>author</th>
                    <th>digest</th>
                    <th>url</th>
                    <th>thumb_url</th>
                    <th>创建时间</th>
                    </thead>
                    <tbody>
                    @foreach($news as $new)
                        <tr>
                            <td>{{$new['media_id']}}</td>
                            <td >{{$new['content']['news_item'][0]['title']}}</td>
                            <td>{{$new['content']['news_item'][0]['author']}}</td>
                            <td>{{$new['content']['news_item'][0]['digest']}}</td>
                            <td width=30%>{{$new['content']['news_item'][0]['url']}}</td>
                            <td><img src="{{$new['content']['news_item'][0]['thumb_url']}}" alt="" style="width: 60px"></td>
                            <td width="10%">{{ date('Y-m-d H:i',$new['content']['create_time'])}}</td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
            </div>
        </div>
    </div>
@endsection

